import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect:'/login',
    children:[
      {
        path: '/zwt/index',
        component: () => import('../views/zwt/AdminIndexView.vue')
      },
      {
        path: '/zwt/user',
        component: () => import('../views/zwt/UserManagementView.vue')
      },
      {
        path: '/admin/index',
        component: () => import('../views/AdminIndexView.vue')
      },


//  订单  dmj  ***************************
      {
        path: '/admin/order/goods',
        component: () => import('../views/dmj/GoodsOrder.vue')
      },{
        path: '/admin/order/house',
        component: () => import('../views/dmj/HouseOrder.vue')
      },{
        path: '/admin/order/records',
        component: () => import('../views/dmj/OrderRecord.vue')
      },
      {
        path: '/admin/order/detail/start',
        component: () => import('../views/dmj/OrderDetailStart')
      },
      {
        path: '/admin/order/detail/finish',
        component: () => import('../views/dmj/OrderDetailfinish')
      },
      {
        path: '/admin/order/detail/close',
        component: () => import('../views/dmj/OrderDetailClose')
      },
      {
        path: '/admin/order/goodsorderdetail/close',
        component: () => import('../views/dmj/GoodsOrderDetailClosed')
      },
      {
        path: '/admin/order/goodsorderdetail/finish',
        component: () => import('../views/dmj/GoodsOrderDetailFinish')
      },
      {
        path: '/admin/order/goodsorderdetail/sended',
        component: () => import('../views/dmj/GoodsOrderDetailSended')
      },
      {
        path: '/admin/order/goodsorderdetail/start',
        component: () => import('../views/dmj/GoodsOrderDetailStart')
      },
      {
        path: '/admin/order/goodsorderdetail/tobesend',
        component: () => import('../views/dmj/GoodsOrderDetailToBeSend')
      },
      {
        path: '/admin/order/goodsorderdetail/cancel',
        component: () => import('../views/dmj/GoodsOrderDetailCancel')
      },
      {
        path: '/admin/order/im',
        component: () => import('../views/dmj/Im'),
      },


// dmj    结束**********************

        //lyj

      {
        path: '/view/inventoryManagement',
        component: () => import('../views/lyj/InventoryManagement.vue')
      },
      {
        path: '/view/inventory/categoryManagement',
        component: () => import('../views/lyj/CategoryManagement.vue')
      },
      {
        path: '/view/inventory/details',
        component: () => import('../views/lyj/CategoryDetails.vue')
      },
      {
        path: '/view/inventory/ware',
        component: () => import('../views/lyj/WareHose.vue')
      },
      {
        path: '/view/inventory/addCategory',
        component: () => import('../views/lyj/CategoryAdd.vue')
      },

//





        // zyt    开始

      {
        path: '/admin/review/tweets',
        component: () => import('../views/zyt/TweetsManagement.vue')
      },{
        path: '/admin/review/comments',
        component: () => import('../views/zyt/CommentsManagement.vue')
      },{
        path: '/admin/review/tweet',
        component: () => import('../views/zyt/Review.vue')
      },

        // zyt    结束


      {
        path: '/admin/content/category',
        component: () => import('../views/szp/AboutView')
      },

      // szp   结束


        //xbw  开始
      {
        path:'/admin/xxx1',
        component:()=>import('../views/xbw/sale')
      },
      {
        path: '/admin/xxx2',
        component:()=>import('../views/xbw/customer')
      },
      {
        path: '/admin/xxx3',
        component:()=>import('../views/xbw/finance')
      },
      {
        path:'/admin/xxx4',
        component:()=>import('../views/xbw/employee')
      },
      {
        path:'/admin/xxx5',
        component:()=>import('../views/xbw/financialDetail')
      }

      //xbw结束



    ]

  },
  {
    path: '/login',
    component: () => import('../views/LoginView.vue')
  },

    ]



const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
